
<!DOCTYPE HTML>
<html lang="zh" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>Getting Started with source & builds · QGroundControl Developer Guide</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    <link rel="stylesheet" href="../../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-richquotes/plugin.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-anchors/plugin.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-page-toc-button/plugin.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-language-picker/plugin.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-versions-select/plugin.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-theme-dronecode/theme_styles.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="container.html" />
    
    
    <link rel="prev" href="../" />
    

    </head>
    <body>
        
    
    <!-- ##HW Add dronecode menu -->
    <div id="common_dronecode_menu">

      <div class="common_menu_logo large_version">
        <a href="https://www.dronecode.org/">
          <img src="../../gitbook/gitbook-plugin-theme-dronecode/images/dronecode_top_bar_logo_full.png" alt="Dronecode logo (large)" />
        </a>
      </div>
      <div class="common_menu_logo small_version">
        <a href="https://www.dronecode.org/">
          <img src="../../gitbook/gitbook-plugin-theme-dronecode/images/dronecode_top_bar_logo_small.png" alt="Dronecode logo (small)" />
        </a>
      </div>
      
      <div class="common_menu_options">
        
            <div class="common_dronecode_menu_item"><a href="http://px4.io/">PX4</a></div>
            <div class="common_dronecode_menu_item large_version"><a href="http://qgroundcontrol.com/">QGroundControl</a></div>
            <div class="common_dronecode_menu_item small_version"><a href="http://qgroundcontrol.com/">QGC</a></div>
            <div class="common_dronecode_menu_item"><a href="https://www.dronecode.org/sdk/">SDK</a></div>
            <div class="common_dronecode_menu_item"><a href="https://mavlink.io/en/">MAVLink</a></div>
            <div class="common_dronecode_menu_item large_version"><a href="https://www.dronecode.org/documentation/">Documentation</a></div>
            <div class="common_dronecode_menu_item small_version"><a href="https://www.dronecode.org/documentation/">Docs</a></div>
            <div class="common_dronecode_menu_item large_version"><a href="http://discuss.px4.io/">Support</a></div>
            <div class="common_dronecode_menu_item small_version"><a href="http://discuss.px4.io/">Help</a></div>
        
      </div>
    </div>
    
<!-- ##HW END Add dronecode menu -->
    
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="輸入並搜尋" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    摘要
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.2" data-path="./">
            
                <a href="./">
            
                    
                    Getting Started with source & builds
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="container.html">
            
                <a href="container.html">
            
                    
                    Build using Containers
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="CentOS.html">
            
                <a href="CentOS.html">
            
                    
                    Using QGC on CentOS
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="../ReleaseBranchingProcess.html">
            
                <a href="../ReleaseBranchingProcess.html">
            
                    
                    QGC Release/Branching Process
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="../communication_flow.html">
            
                <a href="../communication_flow.html">
            
                    
                    Communication Flow
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="../firmware_plugin.html">
            
                <a href="../firmware_plugin.html">
            
                    
                    Plugin Architecture
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="../classes/">
            
                <a href="../classes/">
            
                    
                    Class Hierarchy
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="../ui_design/">
            
                <a href="../ui_design/">
            
                    
                    User Interface Design
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.1" data-path="../ui_design/multi_device_pattern.html">
            
                <a href="../ui_design/multi_device_pattern.html">
            
                    
                    Multi-Device Design Pattern
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2" data-path="../ui_design/font_palette.html">
            
                <a href="../ui_design/font_palette.html">
            
                    
                    Font and Colour Palette
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3" data-path="../ui_design/controls.html">
            
                <a href="../ui_design/controls.html">
            
                    
                    UI Controls
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="../fact_system.html">
            
                <a href="../fact_system.html">
            
                    
                    Fact System
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9" data-path="../views/">
            
                <a href="../views/">
            
                    
                    Top Level Views
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.9.1" data-path="../views/settings.html">
            
                <a href="../views/settings.html">
            
                    
                    Settings View
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.2" data-path="../views/setup.html">
            
                <a href="../views/setup.html">
            
                    
                    Setup View
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.3" data-path="../views/plan.html">
            
                <a href="../views/plan.html">
            
                    
                    Plan View
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.9.3.1" data-path="../plan/MissionCommandTree.html">
            
                <a href="../plan/MissionCommandTree.html">
            
                    
                    Dynamic UI for mission item editing
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.9.4" data-path="../views/fly.html">
            
                <a href="../views/fly.html">
            
                    
                    Fly View
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.10" data-path="../file_formats/">
            
                <a href="../file_formats/">
            
                    
                    File Formats
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11" data-path="../tools/">
            
                <a href="../tools/">
            
                    
                    Developer Tools
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.11.1" data-path="../tools/mock_link.html">
            
                <a href="../tools/mock_link.html">
            
                    
                    Mock Link
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.12" data-path="../command_line_options.html">
            
                <a href="../command_line_options.html">
            
                    
                    Command Line Options
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.13" data-path="../custom_build/custom_build.html">
            
                <a href="../custom_build/custom_build.html">
            
                    
                    Custom Builds
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.13.1" data-path="../custom_build/CreateRepos.html">
            
                <a href="../custom_build/CreateRepos.html">
            
                    
                    Initial Repository Setup For Custom Build
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.13.2" data-path="../custom_build/Plugins.html">
            
                <a href="../custom_build/Plugins.html">
            
                    
                    Custom Build Plugins
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.13.3" data-path="../custom_build/ResourceOverride.html">
            
                <a href="../custom_build/ResourceOverride.html">
            
                    
                    Resources Overrides
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.13.4" data-path="../custom_build/customization.html">
            
                <a href="../custom_build/customization.html">
            
                    
                    Customization
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.13.4.1" data-path="../custom_build/FirstRunPrompts.html">
            
                <a href="../custom_build/FirstRunPrompts.html">
            
                    
                    First Run Prompts
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.13.4.2" data-path="../custom_build/Toolbar.html">
            
                <a href="../custom_build/Toolbar.html">
            
                    
                    Toolbar customization
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.13.4.3" data-path="../custom_build/FlyView.html">
            
                <a href="../custom_build/FlyView.html">
            
                    
                    Fly View Customization
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.13.5" data-path="../custom_build/ReleaseBranchingProcess.html">
            
                <a href="../custom_build/ReleaseBranchingProcess.html">
            
                    
                    Release/Branching Process For Custom Builds
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.13.6" data-path="../custom_build/mavlink.html">
            
                <a href="../custom_build/mavlink.html">
            
                    
                    MAVLink
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.14" data-path="../contribute/">
            
                <a href="../contribute/">
            
                    
                    Code Submission
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.14.1" data-path="../contribute/dev_call.html">
            
                <a href="../contribute/dev_call.html">
            
                    
                    Developer Call
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.14.2" data-path="../contribute/coding_style.html">
            
                <a href="../contribute/coding_style.html">
            
                    
                    Coding Style
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.14.3" data-path="../contribute/unit_tests.html">
            
                <a href="../contribute/unit_tests.html">
            
                    
                    Unit Tests
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.14.4" data-path="../contribute/pull_requests.html">
            
                <a href="../contribute/pull_requests.html">
            
                    
                    Pull Requests
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.14.5" data-path="../contribute/licences.html">
            
                <a href="../contribute/licences.html">
            
                    
                    Licenses
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    
        
        <li class="header">Dronecode快捷方式</li>
        
        
    
        <li class="chapter " data-level="2.1" >
            
                <a target="_blank" href="https://docs.qgroundcontrol.com/en/">
            
                    
                    QGroundControl用户指南
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2" >
            
                <a target="_blank" href="https://docs.px4.io/en/">
            
                    
                    PX4用户指南
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.3" >
            
                <a target="_blank" href="https://dev.px4.io/en/">
            
                    
                    PX4开发人员指南
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.4" >
            
                <a target="_blank" href="https://mavlink.io/en/">
            
                    
                    MAVLink指南
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.5" >
            
                <a target="_blank" href="https://mavsdk.mavlink.io/">
            
                    
                    MAVSDK
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.6" >
            
                <a target="_blank" href="https://camera-manager.dronecode.org/en/">
            
                    
                    Dronecode相机管理器
            
                </a>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            本書使用 GitBook 釋出
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >Getting Started with source & builds</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="&#x5165;&#x95E8;&#x6307;&#x5357;"><a name="&#x5165;&#x95E8;&#x6307;&#x5357;" class="plugin-anchor" href="#&#x5165;&#x95E8;&#x6307;&#x5357;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x5165;&#x95E8;&#x6307;&#x5357;</h1>
<p>&#x672C;&#x4E3B;&#x9898;&#x8BF4;&#x660E;&#x5982;&#x4F55;&#x83B7;&#x53D6;QGroundControl&#x6E90;&#x4EE3;&#x7801;&#x5E76;&#x5728;&#x672C;&#x673A;&#x6216;&#x5728;Vagrant(&#x865A;&#x62DF;&#x673A;)&#x73AF;&#x5883;&#x4E2D;&#x6784;&#x5EFA;&#x5B83;&#x3002; &#x672C;&#x4E3B;&#x9898;&#x8FD8;&#x63D0;&#x4F9B;&#x5176;&#x4ED6;&#x53EF;&#x9009;&#x529F;&#x80FD;&#x4FE1;&#x606F;&#x53CA;&#x7279;&#x5B9A;&#x4E8E;&#x64CD;&#x4F5C;&#x7CFB;&#x7EDF;&#x7684;&#x529F;&#x80FD;&#x4FE1;&#x606F;&#x3002;</p>
<h2 id="&#x6BCF;&#x65E5;&#x6784;&#x5EFA;"><a name="&#x6BCF;&#x65E5;&#x6784;&#x5EFA;" class="plugin-anchor" href="#&#x6BCF;&#x65E5;&#x6784;&#x5EFA;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x6BCF;&#x65E5;&#x6784;&#x5EFA;</h2>
<p>&#x5982;&#x679C;&#x60A8;&#x53EA;&#x662F;&#x60F3;&#x6D4B;&#x8BD5; (&#x800C;&#x4E0D;&#x662F;&#x8C03;&#x8BD5;) &#x6700;&#x8FD1;&#x751F;&#x6210;&#x7684; <em>QGroundControl</em> &#xFF0C;&#x90A3;&#x4E48;&#x8BF7;&#x4F7F;&#x7528;<a href="https://docs.qgroundcontrol.com/en/releases/daily_builds.html" target="_blank">Daily build</a>&#x3002; &#x5B98;&#x65B9;&#x63D0;&#x4F9B;&#x4E86;&#x9002;&#x7528;&#x4E8E;&#x6240;&#x6709;&#x5E73;&#x53F0;&#x7684;&#x7248;&#x672C;&#x3002;</p>
<h2 id="&#x6E90;&#x4EE3;&#x7801;"><a name="&#x6E90;&#x4EE3;&#x7801;" class="plugin-anchor" href="#&#x6E90;&#x4EE3;&#x7801;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x6E90;&#x4EE3;&#x7801;</h2>
<p><em>QGroundControl</em> &#x7684;&#x6E90;&#x4EE3;&#x7801;&#x4FDD;&#x5B58;&#x5728; github &#x4E0A;&#xFF0C;&#x4E0B;&#x8F7D;&#x5730;&#x5740;&#x4E3A;: <a href="https://github.com/mavlink/qgroundcontrol&#x3002;" target="_blank">https://github.com/mavlink/qgroundcontrol&#x3002;</a> QGroundControl&#x6E90;&#x4EE3;&#x7801;&#x5728;Apache 2.0&#x548C;GPLv3&#x4E0B;&#x662F;&#x53CC;&#x8BB8;&#x53EF;&#x7684;&#x3002; &#x6709;&#x5173;&#x66F4;&#x591A;&#x4FE1;&#x606F;&#xFF0C;&#x8BF7;&#x53C2;&#x9605;&#xFF1A;&#x8BB8;&#x53EF;&#x8BC1;&#x3002;</p>
<p>&#x8981;&#x83B7;&#x53D6;&#x6E90;&#x6587;&#x4EF6;, &#x8BF7;&#x6267;&#x884C;&#x4EE5;&#x4E0B;&#x64CD;&#x4F5C;:</p>
<ol>
<li>&#x514B;&#x9686;&#x5B58;&#x50A8;&#x5E93; (&#x6216;&#x60A8;&#x7684;&#x5206;&#x53C9;), &#x5305;&#x62EC;&#x5B50;&#x6A21;&#x5757;: <code>git clone --recursive -j8 https://github.com/mavlink/qgroundcontrol.git</code></li>
<li>2.&#x66F4;&#x65B0;&#x5B50;&#x6A21;&#x5757;&#xFF08;&#x6BCF;&#x6B21;&#x62C9;&#x65B0;&#x6E90;&#x4EE3;&#x7801;&#x65F6;&#x90FD;&#x8FD9;&#x6837;&#x505A;&#xFF09;&#xFF1A; <code>git submodule update --recursive</code></li>
</ol>
<blockquote>
<p>&#x63D0;&#x793A;&#xFF1A;&#x4E0D;&#x80FD;&#x4F7F;&#x7528;Github&#x4EE5;zip&#x5F62;&#x5F0F;&#x4E0B;&#x8F7D;&#x6E90;&#x6587;&#x4EF6;&#xFF0C;&#x56E0;&#x4E3A;zip&#x538B;&#x7F29;&#x5305;&#x4E2D;&#x4E0D;&#x5305;&#x542B;&#x76F8;&#x5E94;&#x7684;&#x5B50;&#x6A21;&#x5757;&#x6E90;&#x4EE3;&#x7801;&#x3002; &#x4F60;&#x5FC5;&#x987B;&#x4F7F;&#x7528;git&#x5DE5;&#x5177;&#xFF01;</p>
</blockquote>
<h2 id="&#x6784;&#x5EFA;qgroundcontrol&#x5F00;&#x53D1;&#x73AF;&#x5883;"><a name="&#x6784;&#x5EFA;qgroundcontrol&#x5F00;&#x53D1;&#x73AF;&#x5883;" class="plugin-anchor" href="#&#x6784;&#x5EFA;qgroundcontrol&#x5F00;&#x53D1;&#x73AF;&#x5883;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x6784;&#x5EFA;QGroundControl&#x5F00;&#x53D1;&#x73AF;&#x5883;</h2>
<h3 id="using-containers"><a name="using-containers" class="plugin-anchor" href="#using-containers"><i class="fa fa-link" aria-hidden="true"></i></a>Using Containers</h3>
<p>We support Linux builds using a container found on the source tree of the repository, which can help you develop and deploy the QGC apps without having to install any of the requirements on your local environment.</p>
<p><a href="container.html">Container Guide</a></p>
<h3 id="native-builds"><a name="native-builds" class="plugin-anchor" href="#native-builds"><i class="fa fa-link" aria-hidden="true"></i></a>Native Builds</h3>
<p><em>QGroundControl</em> builds are supported for macOS, Linux, Windows, iOS and Android. <em>QGroundControl</em> uses <a href="http://www.qt.io" target="_blank">Qt</a> as its cross-platform support library and uses <a href="http://doc.qt.io/qtcreator/index.html" target="_blank">QtCreator</a> as its default build environment.</p>
<ul>
<li>macOS&#xFF1A;v10.11&#x6216;&#x66F4;&#x9AD8;&#x7248;&#x672C;</li>
<li>Ubuntu&#xFF1A;64&#x4F4D;&#xFF0C;gcc&#x7F16;&#x8BD1;&#x5668;</li>
<li><strong>Windows:</strong> Vista or higher, <a href="#vs">Visual Studio 2019 compiler</a> (64 bit)</li>
<li>iOS&#xFF1A;10.0&#x53CA;&#x66F4;&#x9AD8;&#x7248;&#x672C;</li>
<li><strong>Android:</strong> Android 5.0 and later. <ul>
<li>Standard QGC is built against ndk version 19.</li>
<li>Java JDK 11 is required.</li>
</ul>
</li>
<li><p><strong>Qt version:</strong> 5.15.2 <strong>(only)</strong> <!-- NOTE 5.15.2 is set in the variables section of gitbook file https://github.com/mavlink/qgc-dev-guide/blob/master/book.json --> &gt; </p>
<p><strong>Warning</strong> <strong>Do not use any other version of Qt!</strong> QGC has been thoroughly tested with the specified version of Qt (5.15.2). There is a significant risk that other Qt versions will inject bugs that affect stability and safety (even if QGC compiles).</p>
</li>
</ul>
<p>For more information see: <a href="http://doc.qt.io/qt-5/supported-platforms.html" target="_blank">Qt 5 supported platform list</a>.</p>
<p><span></span></p>
<blockquote class="clearfix alert alert-info"><strong class="fa fa-2x fa-edit"></strong>
<p> Native <a href="CentOS.html">CentOS Builds</a> are also supported, but are documented separately (as the tested environment is different).</p>
</blockquote>
<h4 id="vs"><a name="vs" class="plugin-anchor" href="#vs"><i class="fa fa-link" aria-hidden="true"></i></a>Install Visual Studio 2019 (Windows Only) </h4>
<p>The Windows compiler can be found here: <a href="https://visualstudio.microsoft.com/vs/older-downloads/" target="_blank">Visual Studio 2019 compiler</a> (64 bit)</p>
<p>When installing, select <em>Desktop development with C++</em> as shown:</p>
<p><img src="../../assets/getting_started/visual_studio_select_features.png" alt="Visual Studio 2019 - Select Desktop Environment with C++"></p>
<pre><code> &gt; **Note** Visual Studio is ONLY used to get the compiler. Actually building *QGroundControl* should be done using [Qt Creator](#qt-creator) or [qmake](#qmake) as outlined below.
</code></pre><h4 id="&#x5B89;&#x88C5;qt"><a name="&#x5B89;&#x88C5;qt" class="plugin-anchor" href="#&#x5B89;&#x88C5;qt"><i class="fa fa-link" aria-hidden="true"></i></a>&#x5B89;&#x88C5;Qt</h4>
<p>You <strong>need to install Qt as described below</strong> instead of using pre-built packages from say, a Linux distribution, because <em>QGroundControl</em> needs access to private Qt headers.</p>
<p>To install Qt:</p>
<ol>
<li><p>&#x4E0B;&#x8F7D;&#x5E76;&#x8FD0;&#x884C;<a href="http://www.qt.io/download-open-source" target="_blank">Qt Online Installer</a> </p>
<ul>
<li><strong>Ubuntu:</strong> <ul>
<li>&#x4F7F;&#x7528;&#x4EE5;&#x4E0B;&#x547D;&#x4EE4;&#x5C06;&#x4E0B;&#x8F7D;&#x7684;&#x6587;&#x4EF6;&#x8BBE;&#x7F6E;&#x4E3A;&#x53EF;&#x6267;&#x884C;&#x6587;&#x4EF6;&#xFF1A;<code>chmod + x</code></li>
<li>&#x8BF7;&#x5B89;&#x88C5;&#x5230;&#x9ED8;&#x8BA4;&#x4F4D;&#x7F6E;, &#x4EE5;&#x4FBF;&#x4E0E; <strong>./qgroundcontrol-start.sh</strong> &#x4E00;&#x8D77;&#x4F7F;&#x7528;&#x3002;&#x5982;&#x679C;&#x5C06; Qt &#x5B89;&#x88C5;&#x5230;&#x975E;&#x9ED8;&#x8BA4;&#x4F4D;&#x7F6E;, &#x5219;&#x9700;&#x8981;&#x4FEE;&#x6539; <strong>qgroundcontrol-start.sh</strong> &#xFF0C;&#x624D;&#x80FD;&#x8FD0;&#x884C;&#x4E0B;&#x8F7D;&#x7684;&#x7EC4;&#x4EF6;&#x3002;</li>
</ul>
</li>
</ul>
</li>
<li><p>&#x5728;&#x5B89;&#x88C5;&#x7A0B;&#x5E8F; &#x7684;*Select &#x7EC4;&#x4EF6; &lt;/0 &gt; &#x5BF9;&#x8BDD;&#x6846;&#x4E2D;, &#x9009;&#x62E9; 5.15.2&#x3002;&lt;/p&gt; </p>
<blockquote class="clearfix alert alert-info"><strong class="fa fa-2x fa-edit"></strong>
<p> If the version needed is not displayed, check the archive (show archive and refresh).</p>
</blockquote>
<p>&#x7136;&#x540E;&#xFF0C;&#x6309;&#x5982;&#x4E0B;&#x5411;&#x5BFC;&#xFF0C;&#x5B89;&#x88C5;&#x7EC4;&#x4EF6;:</p>
<ul>
<li><strong>Windows</strong>: <em>MSVC 2019 64 bit</em></li>
<li><strong>MacOS</strong>: <em>macOS</em></li>
<li><strong>Linux</strong>: <em>Desktop gcc 64-bit</em></li>
<li><p>All:</p>
<ul>
<li><p><em>Qt Charts</em> <!-- and *Qt Remote Objects (TP)* --></p>
</li>
<li><p><em>Android ARMv7</em> (optional, used to build Android)</p>
</li>
</ul>
<p><img src="../../assets/getting_started/qt_creator_select_components.jpg" alt="QtCreator Select Components (Windows)">&lt;/li&gt; </p>
</li>
<li><p>Install Additional Packages (Platform Specific)</p>
<ul>
<li><strong>Ubuntu:</strong> <code>sudo apt-get install speech-dispatcher libudev-dev libsdl2-dev patchelf build-essential curl</code></li>
<li><strong>Fedora:</strong> <code>sudo dnf install speech-dispatcher SDL2-devel SDL2 systemd-devel patchelf</code></li>
<li><strong>Arch Linux:</strong> <code>pacman -Sy speech-dispatcher patchelf</code></li>
<li><strong>Android:</strong> <a href="http://doc.qt.io/qt-5/androidgs.html" target="_blank">Qt Android Setup</a> &gt; <strong>Note</strong> JDK11 is required (install if needed)!</li>
</ul>
</li>
<li><p>Install Optional/OS-Specific Functionality</p>
<blockquote class="clearfix alert alert-info"><strong class="fa fa-2x fa-edit"></strong>
<p> Optional features that are dependent on the operating system and user-installed libraries are linked/described below. These features can be forcibly enabled/disabled by specifying additional values to qmake.</p>
</blockquote>
<ul>
<li><strong>Video Streaming/Gstreamer:</strong> - see <a href="https://github.com/mavlink/qgroundcontrol/blob/master/src/VideoReceiver/README.md" target="_blank">Video Streaming</a>.</li>
<li><strong>Airmap SDK:</strong> - TBD.</li>
</ul>
</li>
<li><p>Disable platform-specific optional features that are enabled (but not installed), by default.</p>
<blockquote class="clearfix alert alert-info"><strong class="fa fa-2x fa-edit"></strong>
<p> This currently applies to Airmap on Linux, which is optional but enabled by default.</p>
</blockquote>
<ul>
<li><strong>Ubuntu:</strong> <ul>
<li>Airmap: Create a file named <strong>user_config.pri</strong> (in the repo root directory) containing the text <code>DEFINES += DISABLE_AIRMAP</code>. This can be done in a bash terminal using the command: <code>echo -e &quot;DEFINES += DISABLE_AIRMAP\r\n&quot; | tee user_config.pri</code>&lt;/ol&gt; </li>
</ul>
</li>
</ul>
</li>
</ul>
<h4 id="qt-creator"><a name="qt-creator" class="plugin-anchor" href="#qt-creator"><i class="fa fa-link" aria-hidden="true"></i></a>Building using Qt Creator </h4>
<ol>
<li>Launch <em>Qt Creator</em> and open the <strong>qgroundcontrol.pro</strong> project.</li>
<li><p>In the <strong>Projects</strong> section, select the appropriate kit for your needs: </p>
<ul>
<li><strong>OSX:</strong> Desktop Qt 5.15.2 clang 64 bit &gt; <strong>Note</strong> iOS builds must be built using <a href="http://doc.qt.io/qt-5/ios-support.html" target="_blank">XCode</a>.</li>
<li><strong>Ubuntu:</strong> Desktop Qt 5.15.2 GCC 64bit</li>
<li><strong>Windows:</strong> Desktop Qt 5.15.2 MSVC2019 <strong>64bit</strong></li>
<li><strong>Android:</strong> Android for armeabi-v7a (GCC 4.9, Qt 5.15.2) </li>
<li>JDK11 is required. You can confirm it is being used by reviewing the project setting: <strong>Projects &gt; Manage Kits &gt; Devices &gt; Android (tab) &gt; Android Settings &gt; <em>JDK location</em></strong>.</li>
</ul>
</li>
<li><p>Build using the &quot;hammer&quot; (or &quot;play&quot;) icons:</p>
<p><img src="../../assets/getting_started/qt_creator_build_qgc.png" alt="QtCreator Build Button"></p>
</li>
</ol>
<h4 id="qmake"><a name="qmake" class="plugin-anchor" href="#qmake"><i class="fa fa-link" aria-hidden="true"></i></a>Build using qmake on CLI </h4>
<p>Example commands to build a default QGC and run it afterwards:</p>
<ol>
<li>Make sure you cloned the repository and updated the submodules before, see chapter <em>Source Code</em> above and switch into the repository folder: <code>cd qgroundcontrol</code></li>
<li><p>Create and enter a shadow build directory: 
  mkdir build
   cd build</p>
</li>
<li><p>Configure the build using the qmake script in the root of the repository: <code>qmake ../</code></p>
</li>
<li><p>Run make to compile and link. To accelerate the process things you can use the <code>-j{number of threads}</code> parameter. <code>make -j12</code></p>
<blockquote class="clearfix alert alert-info"><strong class="fa fa-2x fa-edit"></strong>
<p> You can also specify build time flags here. For example, you could disable airmap inclusion using the command:</p>
<pre><code>DEFINES+=DISABLE_AIRMAP make build
</code></pre></blockquote>
</li>
<li><p>Run the QGroundcontrol binary that was just built: <code>./staging/QGroundControl</code></p>
</li>
</ol>
<h3 id="vagrant"><a name="vagrant" class="plugin-anchor" href="#vagrant"><i class="fa fa-link" aria-hidden="true"></i></a>Vagrant</h3>
<p><a href="https://www.vagrantup.com/" target="_blank">Vagrant</a> can be used to build and run <em>QGroundControl</em> within a Linux virtual machine (the build can also be run on the host machine if it is compatible).</p>
<ol>
<li><a href="https://www.vagrantup.com/downloads.html" target="_blank">Download</a> and <a href="https://www.vagrantup.com/docs/getting-started/" target="_blank">Install</a> Vagrant</li>
<li>From the root directory of the <em>QGroundControl</em> repository run <code>vagrant up</code></li>
<li>To use the graphical environment run <code>vagrant reload</code></li>
</ol>
<h3 id="additional-build-notes-for-all-supported-os"><a name="additional-build-notes-for-all-supported-os" class="plugin-anchor" href="#additional-build-notes-for-all-supported-os"><i class="fa fa-link" aria-hidden="true"></i></a>Additional Build Notes for all Supported OS</h3>
<ul>
<li><strong>Parallel builds:</strong> For non Windows builds, you can use the <code>-j#</code> option to run parellel builds.</li>
<li><strong>Location of built files:</strong> Individual build file results can be found in the <code>build_debug</code> or <code>build_release</code> directories. The built executable can be found in the <code>debug</code> or <code>release</code> directory.</li>
<li><strong>If you get this error when running <em>QGroundControl</em></strong>: <code>/usr/lib/x86_64-linux-gnu/libstdc++.so.6: version &apos;GLIBCXX_3.4.20&apos; not found.</code>, you need to either update to the latest <em>gcc</em>, or install the latest <em>libstdc++.6</em> using: <code>sudo apt-get install libstdc++6</code>.</li>
<li><strong>Unit tests:</strong> To run the <a href="../contribute/unit_tests.html">unit tests</a>, build in <code>debug</code> mode with <code>UNITTEST_BUILD</code> definition, and then copy <code>deploy/qgroundcontrol-start.sh</code> script into the <code>debug</code> directory before running the tests.</li>
</ul>
<h2 id="building-qgc-installation-files"><a name="building-qgc-installation-files" class="plugin-anchor" href="#building-qgc-installation-files"><i class="fa fa-link" aria-hidden="true"></i></a>Building QGC Installation Files</h2>
<p>You can additionally create installation file(s) for <em>QGroundControl</em> as part of the normal build process.</p>
<blockquote class="clearfix alert alert-info"><strong class="fa fa-2x fa-edit"></strong>
<p> On Windows you will need to first install <a href="https://sourceforge.net/projects/nsis/" target="_blank">NSIS</a>.</p>
</blockquote>
<p>To add support for installation file creation you need to add <code>CONFIG+=installer</code> to your project file, or when you call <em>qmake</em>.</p>
<p>To do this in <em>Qt Creator</em>:</p>
<ul>
<li>Open <strong>Projects &gt; Build &gt; Build Steps &gt; qmake &gt; Additional arguments</strong>.</li>
<li>Enter <code>CONFIG+=installer</code> as shown: <img src="../../assets/getting_started/qt_project_installer.png" alt="Installer"></li>
</ul>
</li>
</ol>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="../" class="navigation navigation-prev " aria-label="Previous page: 摘要">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="container.html" class="navigation navigation-next " aria-label="Next page: Build using Containers">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"Getting Started with source & builds","level":"1.2","depth":1,"next":{"title":"Build using Containers","level":"1.2.1","depth":2,"path":"getting_started/container.md","ref":"getting_started/container.md","articles":[]},"previous":{"title":"摘要","level":"1.1","depth":1,"path":"README.md","ref":"README.md","articles":[]},"dir":"ltr"},"config":{"plugins":["youtube","richquotes@git+https://github.com/Dronecode/gitbook-plugin-richquotes.git","anchors","page-toc-button","collapsible-menu","language-picker","custom-favicon","language-redirect@git+https://github.com/hamishwillee/gitbook-plugin-language-redirect.git","toolbar@git+https://github.com/hamishwillee/gitbook-plugin-toolbar.git","versions-select@git+https://github.com/Dronecode/gitbook-plugin-versions-select.git","theme-dronecode@git+https://github.com/dronecode/theme-dronecode.git"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"theme-dronecode":{"logo":{"logo_large":"gitbook-plugin-theme-dronecode/images/dronecode_top_bar_logo_full.png","logo_small":"gitbook-plugin-theme-dronecode/images/dronecode_top_bar_logo_small.png","url":"https://www.dronecode.org/"}},"collapsible-menu":{},"language-picker":{"grid-columns":3},"youtube":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"versions-select":{"type":"branches"},"language-redirect":{"baseurl":"https://donlakeflyer.gitbooks.io/qgroundcontrol-developers-guide/"},"fontsettings":{"theme":"white","family":"sans","size":2},"richquotes":{"tip":{"alert":"success","picto":"fa-thumbs-o-up"}},"highlight":{},"favicon":"favicon.ico","page-toc-button":{},"custom-favicon":{},"versions":{"gitbookConfigURL":"https://raw.githubusercontent.com/mavlink/qgc-dev-guide/master/book.json","options":[{"value":"https://dev.qgroundcontrol.com/master/en/","text":"master"}]},"toolbar":{"buttons":[{"label":"Bug tracker","icon":"fa fa-bug","position":"left","url":"https://github.com/mavlink/qgc-dev-guide/issues/new?title=Doc+Bug:+{{title}}&body=DESCRIBE+PROBLEM+WITH+DOCS+HERE%0A%0ABug+Page:+[{{title}}]({{url}})"},{"label":"GitHub","icon":"fa fa-github","url":"https://github.com/mavlink/qgc-dev-guide"},{"label":"Edit page on github","icon":"fa fa-pencil-square-o","position":"left","url":"https://github.com/mavlink/qgc-dev-guide/edit/master/{{filepath_lang}}"}]},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"anchors":{}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{"logo":"./assets/site/logo_qgc_rgb_horizontal.png","qgc_version":"master","qt_version":"5.15.2"},"title":"QGroundControl Developer Guide","language":"zh","gitbook":"*"},"file":{"path":"getting_started/README.md","mtime":"2023-12-06T21:07:43.694Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2023-12-06T21:08:22.396Z"},"basePath":"..","book":{"language":"zh"}});
        });
    </script>
</div>

    

        
    <script src="../../gitbook/gitbook.js"></script>
    <script src="../../gitbook/theme.js"></script>
    
        
        <script src="../../gitbook/gitbook-plugin-page-toc-button/plugin.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-collapsible-menu/plugin.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-language-picker/plugin.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-toolbar/buttons.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-versions-select/plugin.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

